{% load staticfiles %}
{% load i18n %}
<!DOCTYPE html>
<html>
<head>
	<meta charset="utf-8">
	<title>Belfu Ship WebManagement</title>
{% block headjs %}
	{%include 'intro/headjs.html' %}
{% endblock %}
</head>
<body>
	<div class="site-wrapper">
		<div class="site-wrapper-inner">
			<div class="cover-container">
				<div class="masthead clearfix">
					<div class="inner">
						<nav class="navbar navbar-inverse navbar-fixed-top">
							<div class="container">
								<div class="navbar-header">
									<button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target='#navbar' aria-expanded="false" aria-controls="navbar">
										<span class="sr-only">Toggle navigation</span>
										<span class="icon-bar"></span>
										<span class="icon-bar"></span>
										<span class="icon-bar"></span>
									</button>
									<a class="navbar-brand" href="/map/">Belfu Ship WebManagement</a>
								</div>
								<div id="navbar" class="navbar-collapse collapse">
									<form class="navbar-form navbar-right">
										<!-- <button type="button" onclick="javascript:window.location.href='login';" class="btn btn-success" >登陆</button> -->
										<button type="button" onclick="login();" class="btn btn-success">登陆</button>
										<button type="button" onclick="register();"class="btn btn-success" >注册</button>
									</form>
								</div>
							</div>
						</nav>
					</div>
				</div>
				<div class="inner cover">
					<h1>大家好，欢迎来到比孚船舶网!</h1>
					<p class="lead">本平台实现了船舶数据的展现和船舶的综合管理，为船舶管理提供更加高效的管理方式。</p>
					<a class="btn btn-primary btn-lg" href="#" role="button">了解更多 &raquo;</a></p>
				</div>
				<div class="mastfoot">
					<div class="inner">
						<p>own by Belfu&copy; Company 2016</p>
					</div>
				</div>
			</div>
		</div>
	</div>

{% if register_error %}
{% for x in register_error %}
<script type="text/javascript">
function error_message()
	{
		$.alert({
			title: '错误提醒!',
			content: '{{x}}',
			theme: 'material',
			animationSpeed: 300,
			autoClose: 'confirm|3000',
			confirm:function()
			{
				window.location.href = '/intro/';
			}
		});
	}
	window.onload = error_message;
</script>
{% endfor %}
{% endif %}
{% if password_is_wrong %}
<script type="text/javascript">
	function error_message()
	{
		$.alert({
			title: '错误提醒!',
			content: "您的账户或者密码有错误,请重新登陆",
			theme: 'material',
			animationSpeed: 300,
			autoClose: 'confirm|3000',
			confirm:function()
			{
				window.location.href = '/intro/';
			}
		});
	}
	window.onload = error_message;
</script>
{% endif %}
{% if password_is_not_valid %}
<script type="text/javascript">
	function error_message()
	{
		$.alert({
			title: '错误提醒!',
			content: "请输入用户名和密码",
			theme: 'material',
			animationSpeed: 300,
			autoClose: 'confirm|3000',
			confirm:function()
			{
				window.location.href = '/intro/';
			}
		});
	}
	window.onload = error_message;
</script>
{% endif %}
</body>
</html>
<script type="text/javascript">
	function login()
	{
		$.dialog({
			title: 'Belfu船舶管理系统!',
			content: "url:/accounts/login/",
			theme: 'material',
			animationSpeed: 500,
		});
	}
	function register()
	{
		$.dialog({
			title: 'Belfu船舶管理系统!',
			content: "url:/accounts/register/",
			theme: 'material',
			animationSpeed: 500,
		});
	}
	
</script>